<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdmin1sTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admin1s', function (Blueprint $table) {
            $table->increments('id');

            $table->string('name')->comment('登录名');
            $table->string('phone')->comment('手机');
            $table->string('email')->comment('邮箱');
            $table->smallInteger('role')->comment('角色');
            $table->smallInteger('is_use')->comment('是否启用');

            $table->timestamps();
        });


//        另一版本
//        Schema::create('admin1s', function (Blueprint $table) {
//            $table->increments('id');
//
//            $table->string('admin1_name')->comment('名称');
//            $table->integer('admin1_phone')->comment('手机');
//            $table->string('admin1_email')->comment('邮箱');
//            $table->smallInteger('admin1_role')->comment('角色');
//            $table->smallInteger('admin1_status')->comment('启用');
//
//            $table->timestamps();
//        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admin1s');
    }
}
